#pragma once
#include"HashTable.h"
template<class K,class Hash=HashFunc<K>>
class MyunorderSet
{
	struct SetofT
	{
		const K& operator()(const K& key)
		{
			return key;
		}
	};
public:
	typedef typename hash_bucket::HashTable<K, K, SetofT, Hash>::iterator iterator;
	typedef typename hash_bucket::HashTable<K, K, SetofT, Hash>::const_iterator const_iterator;

	iterator begin()
	{
		return _ht.begin();
	}
	iterator end()
	{
		return _ht.end();
	}
	const_iterator begin()const
	{
		return _ht.begin();
	}
	const_iterator end()const
	{
		return _ht.end();
	}
	  
	pair<const_iterator, bool> Insert(const K& key)
	{
		iterator ret = _ht.Insert(key);
		return make_pair(ret, true);
	}
	iterator find(const K& key)
	{
		return _ht.Find(key);
	}

	bool erase(const K& key)
	{
		return _ht.Erase(key);
	}
private:
	hash_bucket::HashTable<K, K, SetofT, Hash> _ht;

};